package site.sorghum.ddl.entity;

import lombok.Value;
import site.sorghum.ddl.annotation.DdlAlias;
import site.sorghum.ddl.annotation.DdlId;
import site.sorghum.ddl.annotation.DdlIndex;
import site.sorghum.ddl.annotation.DdlType;

import java.math.BigDecimal;

@Value
@DdlAlias("core_bank_account")
public class BankAccount {
    @DdlId
    String accountNumber;
    @DdlIndex(group = 1)
    @DdlType(value = "longtext", nullable = false)
    @DdlAlias("xx_holder")
    String accountHolder;
    @DdlIndex(group = 1)
    @DdlId
    BigDecimal balance;
    AccountType accountType;

    public enum AccountType {
        SAVINGS, CHECKING, CREDIT
    }
}